home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Graphics;
-
- class CLSTurtle {
- float angle;
- // $FF: renamed from: X float
- float field_0;
- // $FF: renamed from: Y float
- float field_1;
- float scaleX;
- float scaleY;
- int xoff;
- int yoff;
-
- public CLSTurtle(float ang, float x, float y, int xorg, int yorg, float sx, float sy) {
- this.angle = ang;
- this.scaleX = sx;
- this.scaleY = sy;
- this.field_0 = x * sx;
- this.field_1 = y * sy;
- this.xoff = xorg;
- this.yoff = yorg;
- }
-
- public CLSTurtle(CLSTurtle turtle) {
- this.angle = turtle.angle;
- this.field_0 = turtle.field_0;
- this.field_1 = turtle.field_1;
- this.scaleX = turtle.scaleX;
- this.scaleY = turtle.scaleY;
- this.xoff = turtle.xoff;
- this.yoff = turtle.yoff;
- }
-
- public void rotate(float theta) {
- this.angle += theta;
- }
-
- public void jump() {
- this.field_0 += (float)Math.cos((double)this.angle) * this.scaleX;
- this.field_1 += (float)Math.sin((double)this.angle) * this.scaleY;
- }
-
- public void draw(Graphics g) {
- float x = this.field_0 + (float)Math.cos((double)this.angle) * this.scaleX;
- float y = this.field_1 + (float)Math.sin((double)this.angle) * this.scaleY;
- g.drawLine((int)this.field_0 + this.xoff, (int)this.field_1 + this.yoff, (int)x + this.xoff, (int)y + this.yoff);
- this.field_0 = x;
- this.field_1 = y;
- }
- }
-